<?php
/**
 * Description of MoneyFactoryclass
 *
 * @author marius
 */
require_once("Money.class.php");
class MoneyFactory {

    private static $_defaultInstance;

    public static function getDefaultFactory() {
        if (!isset($_defaultInstance))
            MoneyFactory::$_defaultInstance=new MoneyFactory();
        return MoneyFactory::$_defaultInstance;
    }

    public function createMoney($valueNote, $valuePiece, $devise) {
        return new Money($valueNote, $valuePiece, $devise);
    }
}
?>
